#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void sort(int* arr, int n)
{
    int i = 0;
    int j = 0;
    int temp = 0;
    for (i = 0; i < n - 1; i++)
    {
        for (j = 0; j < n - i - 1; j++)
        {
            if (*(arr + j) > *(arr + j + 1))
            {
                temp = *(arr + j);
                *(arr + j) = *(arr + j + 1);
                *(arr + j + 1) = temp;
            }
        }
    }
}
int main()
{
    int arr[7] = { 0 };
    int n = 7;
    int i = 0;
    float sum = 0;
    float ave = 0;
    while (scanf("%d %d %d %d %d %d %d", &arr[0], &arr[1], &arr[2], &arr[3], &arr[4], &arr[5], &arr[6]) != EOF)
    {
        sum = 0; sort(arr, n);
        for (i = 1; i < n - 1; i++)
        {
            sum += arr[i];
        }
        ave = sum / (n - 2);
        printf("%.2f\n", ave);
    }

}